package com.sneakxy.mybatis.commons.annotations;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import org.apache.ibatis.type.JdbcType;
import org.apache.ibatis.type.TypeHandler;

import com.sneakxy.mybatis.commons.repository.query.parser.NullTypeHandler;

/**
 * 字段属性注解
 * @author 潜行的青衣
 */
@Target({FIELD})
@Retention(RUNTIME)
public @interface Column {
	
	String value() default "";
	
	JdbcType jdbcType() default JdbcType.VARCHAR;
	
	String select() default "";
	
	String resultMap() default "";
	
	String notNullColumn() default "";
	
	String columnPrefix() default "";
	
	Class<? extends TypeHandler<?>> typeHandler() default NullTypeHandler.class;
	
	String resultSet() default "";
	
	String foreignColumn() default "";
	
	String fetchType() default "";
	
}
